package com.admin.controller.admin.email;

import com.common.util.QiniuUtil;
import com.system.constant.HTTPStatus;
import com.system.response.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname QiniuController
 * @Date 2023/8/8 13:32
 * @Created ZFC
 */
@RestController
@RequestMapping("/sys/qiniu")
public class QiniuController {

    @GetMapping("/getUpToken")
    public Result getUpToken(@RequestParam(value = "key", required = false) String key){
        return new Result().setCode(HTTPStatus.SUCCESS).setData(QiniuUtil.getToken(key));
    }
}
